strace is a diagnostic and debugging utility for examining interactions between Linux processes and the kernel. It records system calls, signals and changes in process state, providing insight into what an application is doing at the operating system level.
Unlike source-level debuggers, strace does not require access to application source code or debugging symbols. This makes it particularly useful for investigating unexpected file access, permission failures, network connection problems and applications that behave differently across systems.
The utility can trace a program from startup or attach to an existing process. Its output identifies system calls, their arguments and returned results, making it possible to investigate failures and understand how applications use kernel services.
This is free and open source software.
Key Features
- Trace system calls and signals generated by individual processes, including applications that are already running.
- Filter system calls by name, regular expression or predefined categories covering files, networking, memory, processes and other operations.
- Restrict tracing to activity involving selected file paths or file descriptors.
- Display information associated with file descriptors, including file paths and socket details.
- Inspect data read from and written to file descriptors, with hexadecimal and ASCII representations.
- Record timestamps, elapsed time and system call execution duration.
- Generate statistical summaries showing system call counts, execution times and errors.
- Filter traced calls according to their return status.
- Follow processes and threads created through operations such as fork, clone and vfork.
- Capture stack traces to help relate system calls to their originating code paths.
- Inject system call failures, modify return values and deliver signals to investigate application error handling.
- Decode system call arguments and results to make low-level kernel interactions easier to interpret.
Website: github.com/strace/strace
Support:
Developer: Dmitry Levin
License: GNU Lesser General Public License v2.1
strace is written in C. Learn C with our recommended free books and free tutorials.
Related Software
| Debuggers | |
|---|---|
| LLDB | Next generation, high-performance debugger |
| Ghidra | Software reverse engineering framework |
| Delve | Source level debugger for the Go programming language |
| GDB | The GNU Debugger |
| Valgrind | A memory debugger and profiler |
| Radare2 | Portable reversing framework |
| BugStalker | Rust debugger |
| Xdebug | Extension for PHP to aid debugging and development |
| Seer | GUI frontend to GDB |
| iaito | Graphical interface for radare2 |
| KDbg | Graphical user interface to GDB |
| strace | Diagnostic, debugging and instructional userspace utility |
| rr | Record-and-replay debugger |
| gf | Lightweight GDB interface with source, stack and memory views |
| drgn | Programmable debugger that puts scripting at the centre |
| cgdb | Lightweight console frontend to the GNU debugger |
| PuDB | Console-based visual debugger for Python |
| nnd | Partially inspired by RemedyBG |
| bashdb | Source-code debugger for bash; follows the GDB command syntax |
| PINCE | Memory scanning, process manipulation and reverse engineering |
| edb | Low-level debugging with disassembly and register inspection |
| Sysprof | Profile an application or entire system |
| crash | Linux kernel crash analysis utility |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.